<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
<script>
  // Then some JavaScript in the browser:
  var conn = new WebSocket('ws://localhost:8080/echo');
  conn.onmessage = function(e) { console.log(e.data); };
  conn.onopen = function(e) { conn.send('Hello Me!'); };
</script>
</html>